package com.ervanalb.cellradio.shared.communicator.packets;

import java.nio.ByteBuffer;

public class ConnectedPacketData {
	public int id;
	
	public ConnectedPacketData(ByteBuffer bb)
	{
		id=bb.getInt();
	}
	
	public int size()
	{
		return 4;
	}

	public ConnectedPacketData(int id) {
		this.id=id;
	}
	
	public PacketData pack()
	{
		ByteBuffer bb=ByteBuffer.allocate(size());
		bb.putInt(id);
		bb.rewind();
		return new PacketData(PacketData.TYPE_CONNECTED,bb);
	}
}
